/*
 * @ author madman
 * @ use 联系人列表
 */
var mongoose = require("mongoose");
var Schema = mongoose.Schema;
var shortid = require('shortid');
var contactSchema = new Schema({
    _id: {
      type: String,
      'default': shortid.generate
    },
    // 联系人
    username: {
      type: String
    },
    countryId: {
      type: Schema.Types.ObjectId,
      ref: 'j_country'
    },
    // 联系电话
    iphone: {
      type: String
    },
    // 号码
    msisdn: {
      type: String
    },
    // 购买时间
    createdAt: {
      type: Date,
      default: Date.now
    }
});

module.exports = mongoose.model('j_contact', contactSchema, 'j_contact');